import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
const path = require('path')
// https://vitejs.dev/config/
import vuesetupExtend from 'vite-plugin-vue-setup-extend'
export default defineConfig({
  plugins: [vue({
    reactivityTransform:true
  }), vuesetupExtend()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src')
    }
  },
  css: {
    preprocessorOptions: {
      less: {
        additionalData: `
          @import "@/assets/styles/variables.less";
          @import "@/assets/styles/mixins.less";
        `
      }
    }
  },
 
    // 配置开发服务器
    server: {
      port: 8080,
      host: 'www.corho.com',
      open: true, // 帮我们打开浏览器
      cors: true, // 允许开发时 ajax 跨域
    }
})
